<%@ page language="java" import="java.util.*,news.*,java.text.*" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
    
<!DOCTYPE html>
<html>
<head>
<base href="<%=basePath%>"> 
<meta http-equiv="Content-Type" content="text/html;charset=gbk" />
<title>新闻中国</title>
<link href="css/main.css" rel="stylesheet" type="text/css" />

</head>

<body onload="focusOnLogin()">

<div id="header">
  <div id="top_login">
  
  	<div style="color:red">${requestScope.msg }</div>
	<c:remove var="msg"/>  
	
	<c:if test=""></c:if>
    <form action="LoginServlet" method="post" >
      <label> 登录名 </label>
      <input type="text" name="uname" id="uname" value="" class="login_input" />
      <label> 密&#160;&#160;码 </label>
      <input type="password" name="upwd" id="upwd" value="" class="login_input" />
      <input type="submit" class="login_sub" value="登录" />
      <label id="error"> </label>
      <img src="images/friend_logo.gif" alt="Google" id="friend_logo" />
    </form>
  </div>
  <div id="nav">
    <div id="logo"> <img src="images/logo.jpg" alt="新闻 " /> </div>
    <div id="a_b01"> <img src="images/a_b01.gif" alt="" /> </div>
  </div>
</div>
<div id="container">

<jsp:include page="/LeftServlet"></jsp:include>   <!-- 左侧置顶页面 -->

  <div class="main">
    <div class="class_type"> <img src="images/class_type.gif" alt="新闻中心" /> </div>
    <div class="content">
    
		<ul class="class_date">			 <!-- 新闻分类 -->
	      	<li id='class_month'>
	      	   <c:forEach items="${list }" var="t" varStatus="status">
	      	   		<a href="MainServlet?tid=${t.tid }" >
	      			<b>${t.tname }</b></a>
	      		  <c:if test="${status.index==10 }">
	      		  		 </li><li id='class_month'>
	      		  </c:if>
	      	   </c:forEach>  	      	
      		</li>	
      </ul>
<ul class="classlist">		<!-- 新闻分类下的新闻列表 -->

		<c:forEach items="${plist.datas}" var="news" varStatus="status">
			<li><a href='NewsServlet?nid=${news.nid }'>${news.ntitle }
       	   		</a><span><fmt:formatDate value="${news.ncreateDate}" pattern="yyyy-MM-dd hh:mm"/></span></li>
			<c:if test="${status.index>0&&status.index==5 }">
				<li class='space'></li>
			</c:if>
		</c:forEach> 		
</ul>
       <p align="right"> 当前页数:[${plist.pageNo }/${plist.pageNums }]
       		<c:set var="pageNo" value="${pageNo2 }"></c:set> 
       		<c:if test="${pageNo>1 }">
       			&nbsp;<a href="MainServlet?pageNo=1">首页</a>
       	  		&nbsp;<a href="MainServlet?pageNo=${plist.pageNo-1 }">上一页</a> 
       		</c:if>
       		<c:if test="${plist.pageNo<plist.pageNums}">
       			&nbsp;<a href="MainServlet?pageNo=${plist.pageNo+1 }">下一页</a>
       	        &nbsp;<a href="MainServlet?pageNo=${plist.pageNums }">末页</a> 
       		</c:if>
       	  </p> 
    </div>   
<div class="picnews">
  <ul>
    <li> <a href="#"><img src="images/Picture1.jpg" width="249" alt="" /> </a><a href="#">幻想中穿越时空</a> </li>
    <li> <a href="#"><img src="images/Picture2.jpg" width="249" alt="" /> </a><a href="#">国庆多变的发型</a> </li>
    <li> <a href="#"><img src="images/Picture3.jpg" width="249" alt="" /> </a><a href="#">新技术照亮都市</a> </li>
    <li> <a href="#"><img src="images/Picture4.jpg" width="249" alt="" /> </a><a href="#">群星闪耀红地毯</a> </li>
  </ul>
</div>
  </div>
</div>
  <div id="friend">
  <h1 class="friend_t"> <img src="images/friend_ico.gif" alt="合作伙伴" /> </h1>
  <div class="friend_list">
    <ul>
      <li> <a href="#">百度</a> </li>
      <li> <a href="#">谷歌</a> </li>
      <li> <a href="#">新浪</a> </li>
      <li> <a href="#">网易</a> </li>
      <li> <a href="#">搜狐</a> </li>
      <li> <a href="#">人人</a> </li>
      <li> <a href="#">中国政府网</a> </li>
    </ul>
  </div>
</div>
<div id="footer">
  <p class=""> 24小时客户服务热线：010-68988888 &#160;&#160;&#160;&#160; <a href="#">常见问题解答</a> &#160;&#160;&#160;&#160; 新闻热线：010-627488888 <br />
    文明办网文明上网举报电话：010-627488888 &#160;&#160;&#160;&#160; 举报邮箱： <a href="#">jubao@jb-aptech.com.cn</a> </p>
  <p class="copyright"> Copyright &copy; 1999-2009 News China gov, All Right Reserver <br />
    新闻中国 版权所有 </p>
</div>
</body>
</html>




